package com.ciei.dpagm.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.ciei.dpagm.common.service.BaseService;
import com.ciei.dpagm.entity.ChipInterfaceParameter;
import com.ciei.dpagm.mapper.ChipInterfaceParameterMapper;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

/**
 * @author wangyan
 * @date 2023/05/08
 */
@Service
public class ChipInterfaceParameterService extends BaseService<ChipInterfaceParameterMapper, ChipInterfaceParameter> {

    /**
     * 获取列表
     * @param interfaceIdList
     * @return
     */
    public List<ChipInterfaceParameter> getList(List<Integer> interfaceIdList){
        if(interfaceIdList.isEmpty()){
            return new ArrayList<>();
        }
        LambdaQueryWrapper<ChipInterfaceParameter> lambdaQueryWrapper = new LambdaQueryWrapper<>();
        lambdaQueryWrapper.in(ChipInterfaceParameter::getInterfaceId,interfaceIdList);
        return list(lambdaQueryWrapper);
    }

}
